package com.example.cc.common.api;

import com.example.cc.common.dto.RegisterDTO;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

public interface ConfigOpenApi {

    @PostMapping("/register")
    ResponseEntity<Void> registerClient(@RequestBody RegisterDTO registration);

    @DeleteMapping("/unregister/{clientId}")
    ResponseEntity<Void> unregisterClient(@PathVariable String clientId);

    @GetMapping("/config/getAll")
    Map<String, String> getAllConfigs();

    @GetMapping("/config/{key}")
    ResponseEntity<String> getConfigByKey(@PathVariable String key);

    @PutMapping("/config/{key}")
    ResponseEntity<String> updateConfig(@PathVariable String key, @RequestParam String value);

    @PostMapping("/config/create")
    ResponseEntity<String> createConfig(@RequestParam String key, @RequestParam String value);

    @DeleteMapping("/config/{key}")
    ResponseEntity<String> deleteConfig(@PathVariable String key);
}
